!(function (lib,config) {
    if (!lib) return;
    var loadFunc = function () {
        var wordAry = config.words.split('|'),wordIdx=0;

        document.writeln("<style type=\"text/css\">");
        document.writeln("#LR-BUBBLE{ margin:0 5% 5% 5% !important;border-radius:10px;background-color:"+config.bgcolor+" !important;border:1px solid #38b8f5; }#LR-BUBBLE-NAME{ color:#6D5220;font-weight:bold;}#LR-BUBBLE-MSG{ color:"+config.textcolor+"; font-weight:bold;height: auto !important;}#LR-BUBBLE-MSG img{ width:32px; height:32px;}");
        document.writeln("#LR-BUBBLE { -webkit-animation: shake-little 10s both infinite; -moz-animation: shake-little 10s both infinite; -ms-animation: shake-little 10s both infinite; animation: shake-little 10s both infinite; }");
        document.writeln(".footcss {z-index: 999999999999999999 !important;position: relative !important;}");
        document.writeln("@-webkit-keyframes shake-little { 0, 20% {");
        document.writeln(" -webkit-transform: translate(0px, 0px) rotate(0deg)");
        document.writeln("}");
        document.writeln("21% {");
        document.writeln(" -webkit-transform: translate(0px, 0px) rotate(0deg)");
        document.writeln("}");
        document.writeln("21.3% {");
        document.writeln(" -webkit-transform: translate(-2px, 2px) rotate(0.5deg)");
        document.writeln("}");
        document.writeln("21.6% {");
        document.writeln(" -webkit-transform: translate(0px, 0px) rotate(0deg)");
        document.writeln("}");
        document.writeln("22% {");
        document.writeln(" -webkit-transform: translate(2px, -2px) rotate(-0.5deg)");
        document.writeln("}");
        document.writeln("22.3% {");
        document.writeln(" -webkit-transform: translate(0px, 0px) rotate(0deg)");
        document.writeln("}");
        document.writeln("22.6% {");
        document.writeln(" -webkit-transform: translate(-2px, 2px) rotate(0.5deg)");
        document.writeln("}");
        document.writeln("23% {");
        document.writeln(" -webkit-transform: translate(0px, 0px) rotate(0deg)");
        document.writeln("}");
        document.writeln("23.3% {");
        document.writeln(" -webkit-transform: translate(2px, -2px) rotate(-0.5deg)");
        document.writeln("}");
        document.writeln("23.6% {");
        document.writeln(" -webkit-transform: translate(0px, 0px) rotate(0deg)");
        document.writeln("}");
        document.writeln("24% {");
        document.writeln(" -webkit-transform: translate(2px, -2px) rotate(-0.5deg)");
        document.writeln("}");
        document.writeln("24.3%, 100% {");
        document.writeln(" -webkit-transform: translate(0px, 0px) rotate(0deg)");
        document.writeln("}");
        document.writeln("}");
        document.writeln("</style>");
        document.writeln("<style type=\"text/css\">#LR-BUBBLE{ position:fixed; right: 0; bottom: 40% !important; display: none; width: 90%; margin: 0 5%; background-color:#fff7e4; color: #000; text-align: left; box-shadow: 0 5px 16px 0 rgba(0, 0, 0, .16);  border-radius:10px; z-index: 9999999; }#LR-BUBBLE-INSIDE{ text-align: left; line-height:20px; height:auto; }.LR-ICONs { background-size: 26px auto !important; background-repeat: no-repeat !important; background-image: url(http://m.hhzjnk120.com/images/bottom_tan/gb.png) !important; }#LR-BUBBLE-CLOSE { position: absolute; top: 1px; right: 3px; width: 36px; height: 36px; background-position: 0px 0px !important; -webkit-filter: brightness(0.6); }#LR-BUBBLE-MSG { height: auto !important; margin-top: 5px; font-size: 14px; overflow: hidden; color: #520606 !important; }#LR-BUBBLE-MSG p{ padding:0; margin:0; line-height:20px; width: 84%; font-size: 1em; line-height:1.2em; padding-top:0.5em; }#LR-BUBBLE-MSG p img { width:20px; height:20px;}#LR-BUBBLE-NAME { font-weight: bold; color: #d6601b !important; font-size: 16px; }#LR-BUBBLE-title{ width: 100%; height:auto !important;}#LR-BUBBLE-AVATAR { width: 36px; height: 36px; float: left; border-radius: 18px; margin-right: 6px; vertical-align: top; box-shadow: 0 0 8px 0 rgba(0, 0, 0, .15); }.footerdh{width:100%; height:38px; }.footerdh img {width:100%; height:38px;border-radius:0 0 10px 10px;}<\/style>");
        document.writeln("<div id=\"LR-BUBBLE\"><span class=\"LR-ICONs\" id=\"LR-BUBBLE-CLOSE\" onclick=\"closebar();\"></span><div id=\'LR-BUBBLE-INSIDE\' onclick=\"clicktc('chatwin','&amp;e=mini_tan_" + config.positionid + "_" + config.identifier + "');return false;\"></div><div class=\"footerdh\" onclick=\"clicktc('chatwin','&amp;e=mini_tanhh_" + config.positionid + "_" + config.identifier + "');return false;\"><img src=\"http://fkm.hhzjfk120.com/wjs/footerhh.gif\"/><\/div><\/div>");

        function toolkey() {
            document.getElementById('LR-BUBBLE').style.display = 'block';
            document.getElementById('LR-BUBBLE-INSIDE').innerHTML = "<div id=\'LR-BUBBLE-title\' style=\'display: block;\'><img id=\'LR-BUBBLE-AVATAR\' src=\'" + config.imglink + "\'><span id=\'LR-BUBBLE-NAME\'>" + config.dotname + "</span></div><div id=\'LR-BUBBLE-MSG\'>" + wordAry[wordIdx] + "</div>";
            if (++wordIdx < wordAry.length)setTimeout(arguments.callee, 3000);
        };
        function closebar() {
            document.getElementById('LR-BUBBLE').style.display = 'none';
            setTimeout(toolkey, config.relapsetime*1000);
        };
        setTimeout(toolkey, config.firsttime * 1000);
    };
    lib.load(loadFunc);
})('{{lib}}','{{config}}');


